var testEditor;
var toolbarModes={
	full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],
	simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],
	mini:["undo","redo","|","watch","preview","|","help","info"],
	custom:["undo","redo","|","bold","del","italic","quote","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","image","code-block","table","datetime","html-entities","|","watch","preview","fullscreen","clear"],	
	article:["undo","redo","|","bold","del","italic","quote","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","image","code-block","table","datetime","html-entities","|","watch","preview","fullscreen","clear","search"]	
}
 
testEditor=$(function() {
    editormd("test-editormd", {
        width   : "100%",
        height  : 640,
        //markdown : md,
        codeFold : true,
        syncScrolling : "single",
        //你的lib目录的路径
        path    : "../../editor.md-master/lib/",
        imageUpload: true,//打开图片上传功能
        imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
		imageUploadURL : "/HyperIT/article/uploadimg",
        /*  theme: "dark",//工具栏主题
        previewTheme: "dark",//预览主题
        editorTheme: "pastel-on-dark",//编辑主题 */
        emoji: false,
        taskList: false, 
        tocm: false,         // Using [TOCM]
        tex: false,                   // 开启科学公式TeX语言支持，默认关闭
        flowChart: false,             // 开启流程图支持，默认关闭
        sequenceDiagram: false,       // 开启时序/序列图支持，默认关闭,
        //这个配置在simple.html中并没有，但是为了能够提交表单，使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中，方便post提交表单。
        toolbarIcons : function() {
        	// Or return editormd.toolbarModes[name]; // full, simple, mini
        	// Using "||" set icons align right.
        	return toolbarModes.article;
       	},
        saveHTMLToTextarea : true
    });

  });